package utils

import (
	"github.com/gin-contrib/sessions"
	"github.com/gin-contrib/sessions/cookie"
	"github.com/gin-gonic/gin"
)

var Store sessions.Store

func InitSession() {
	Store = cookie.NewStore([]byte("photo_gallery"))
}

func SessionMiddleware() gin.HandlerFunc {
	return sessions.Sessions("photo_gallery_session", Store)
}
